<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateDioceseTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('diocese', function (Blueprint $table) {
            $table->id();
            $table->string('title')->comment('标题');
            $table->string('name')->comment('英文标题唯一值');
            $table->integer('church_num')->comment('所属堂区数量');
            $table->integer('mechanism_num')->comment('所属机构数量');
            $table->integer('cathedral_id')->comment('主教座堂id');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('diocese_models');
    }
}
